package god;

import java.util.Scanner;

public class J12Circle {
	public static void main(String[] args) {
		Circles c = new Circles();
		c.getRadius( c.makeScanner() );
		System.out.println( c.getArea(c.radius, c.PI));
		System.out.println( c.getPerimeter(c.radius, c.PI));
	}

}

class Circles {
	double radius;
	final double PI = 3.14;

	public Scanner makeScanner() {
		Scanner sc = new Scanner(System.in);
		return sc;
	}

	public void closeScanner(Scanner sc) {
		sc.close();
	}

	public double getRadius(Scanner sc) {
		System.out.println("반지름을 입력해 주세요");
		radius = sc.nextDouble();
		closeScanner(sc);
		return radius;
	}

	public double getArea(double radius, double PI) {
		return radius * radius * PI;
	}

	public double getPerimeter(double radius, double PI) {
		return radius * 2 * PI;
	}
}